
import { PORT1 } from "@/api/config/servicePort";
import http from "@/api";


//假期余额列表头部
export const getleavesHeadApi = (params: FormData) => {
    return http.get(PORT1+`/personnel/leaves-remaining/field`, params, { cancel: false,loading: false  });
};
//假期余额列表
export const getleavesListApi = (params: FormData) => {
    return http.post(PORT1+`/personnel/leaves-remaining/list`, params,  { cancel: false,loading: false  });
};


//假期余额-增扣保存
export const getleavesremainingApi = (params: FormData) => {
    return http.post(PORT1+`/personnel/leaves-remaining/edit`, params,  { cancel: false,loading: false  });
};

//年假日志
export const getjlApi = (params: FormData) => {
    return http.post(PORT1+`/personnel/leaves-log/list`, params,  { cancel: false,loading: false  });
};



//假期设置列表头部
export const getSetHeadApi = (params: FormData) => {
    return http.get(PORT1+`/personnel/leaves-set/field`, params, { cancel: false,loading: false  });
};
//假期设置列表
export const getSetListApi = (params: FormData) => {
    return http.post(PORT1+`/personnel/leaves-set/list?get_auth=1&auth_name=manageSet`, params,  { cancel: false,loading: false  });
};
//新增假期类型
export const saveCreateSet = (params: FormData) => {
    return http.post(PORT1+`/personnel/leaves-set/create`, params, { cancel: false });
};
//修改假期类型
export const saveEditSet = (params: FormData) => {
    return http.post(PORT1+`/personnel/leaves-set/edit`, params, { cancel: false });
};

//删除假期类型
export const delSet = (params: FormData) => {
    return http.get(PORT1+`/personnel/leaves-set/delete`, params, { cancel: false });
};


//请假列表头部
export const getRecordHeadApi = (params: FormData) => {
    return http.get(PORT1+`/personnel/leaves-record/field`, params, { cancel: false,loading: false  });
};
//请假设置列表
export const getRecordListApi = (params: FormData) => {
    return http.post(PORT1+`/personnel/leaves-record/list?get_auth=1&auth_name=manageRecord`, params,  { cancel: false,loading: false  });
};
//请假详情
export const getxqApi = (params: FormData) => {
    return http.post(PORT1+`/personnel/leaves-record/info`, params,  { cancel: false,loading: false  });
};


//系统日志
export const getSysLogHeader = (params: FormData) => {
    return http.post(PORT1+`/sys/log/field`, params,  { cancel: false,loading: false  });
};
export const getSysLogList = (params: FormData) => {
    return http.post(PORT1+`/sys/log/list`, params,  { cancel: false,loading: false  });
};









  
//新增翻译
export const saveCreateTranslation = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/sys/message/create`, params, { cancel: false });
};
//修改翻译
export const saveEditTranslation = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/sys/message/edit`, params, { cancel: false });
};

//删除
export const delTranslationOne = (params: FormData) => {
    return http.get(PORT1+`/sys/message/delete`, params, { cancel: false });
};

//同步翻译
// /
export const publishJs = (params: FormData) => {
    return http.get(PORT1+`/sys/message/publish-js`, params, { cancel: false });
};





//测试统计接口
export const saveStatistics = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/api/save-statistics-config`, params, { cancel: false });
};
//测试统计接口
export const getStatistics = (params: FormData) => {
    return http.post<translationMap[]>(PORT1+`/api/get-statistics-config`, params, { cancel: false });
};

//测试统计接口
export const getEveryStatistics = (geturl:string , params: FormData) => {
    return http.post<translationMap[]>(PORT1+geturl, params, { cancel: false });
};
  
  

